﻿Imports TNCDAL

Public Class UserController
    Private objRepository As New UserRepository
    Public Function GetUser(ByVal username As String, ByVal pass As String) As tblUser
        Return objRepository.GetUser(username, CThanh_Utilities.getMd5Hash(pass))
    End Function

    Public Function DuocPhepChay(ByVal userName As String, ByVal pass As String) As Boolean
        Dim KQ As Boolean = False
        Dim userModel As New UserRepository
        Try
            GeneralClassBAL._User = GetUser(userName, pass)
            If GeneralClassBAL._User IsNot Nothing Then
                KQ = True
            End If
        Catch ex As System.Exception
            KQ = False
        End Try
        Return KQ
    End Function
End Class
